home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / C_QNA.ARJ / LPT2PRN.TC < prev    next >
Text File  |  1991-04-01  |  398b  |  17 lines

  1. QUESTION:  How can I send output to the second parallel port?
  2.  
  3. ANSWER:    Open up a stream using a filename of "LPT2".  Here's an
  4.            example:
  5.  
  6.    /*------------------------- lpt2prn.c -----------------------*/
  7.    #include <stdio.h>
  8.  
  9.    main()
  10.    {
  11.      FILE *lst2;
  12.  
  13.      lst2 = fopen("LPT2", "w");
  14.      fprintf(lst2, "This will go through LPT2.\n");
  15.      fclose(lst2);
  16.    }
  17.